import request from '@/utils/request'

// 查询融资信息列表
export function listCompanyFinance(query) {
  return request({
    url: '/finance/companyFinance/list',
    method: 'get',
    params: query
  })
}

// 查询融资信息详细
export function getCompanyFinance(id) {
  return request({
    url: '/finance/companyFinance/' + id,
    method: 'get'
  })
}

// 保存融资信息
export function saveCompanyFinance(data) {
  return request({
    url: '/finance/companyFinance/save',
    method: 'post',
    data: data
  })
}

// 删除融资信息
export function delCompanyFinance(id) {
  return request({
    url: '/finance/companyFinance/' + id,
    method: 'delete'
  })
}

// 导出融资信息
export function exportCompanyFinance(query) {
  return request({
    url: '/finance/companyFinance/export',
    method: 'get',
    params: query
  })
}

// 获取最新融资历史公司总股本
export function getLatestTotalShare(companyId) {
  return request({
    url: '/finance/companyFinance/getLatestTotalShare/' + companyId,
    method: 'get'
  })
}
